package com.zdp.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.core.GrantedAuthority;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

/**
 * @author sesshomaru
 * @date 2021/7/6
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_roles")
@Data
public class Role implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "role_name")
    private String authority;

    private Set<Permission> permissions = new HashSet<>();

}
